home *** CD-ROM | disk | FTP | other *** search
/ Risc World 1 / Risc World 1.iso / software / issue2 / jclean / !Jclean / doc / README < prev    next >
Text File  |  2000-03-29  |  20KB  |  387 lines

  1. The Independent JPEG Group's JPEG software
  2. ==========================================
  3.  
  4. README for release 6b of 27-Mar-1998
  5. ====================================
  6.  
  7. This distribution contains the sixth public release of the Independent JPEG
  8. Group's free JPEG software.  You are welcome to redistribute this software
  9. and to use it for any purpose, subject to the conditions under LEGAL ISSUES,
  10. below.
  11.  
  12. Serious users of this software (particularly those incorporating it into
  13. larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
  14. our electronic mailing list.  Mailing list members are notified of updates
  15. and have a chance to participate in technical discussions, etc.
  16.  
  17. This software is the work of Tom Lane, Philip Gladstone, Jim Boucher, Lee
  18. Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Guido
  19. Vollbeding, Ge' Weijers, and other members of the Independent JPEG Group.
  20.  
  21. IJG is not affiliated with the official ISO JPEG standards committee.
  22.  
  23.  
  24. DOCUMENTATION ROADMAP
  25. =====================
  26.  
  27. This file contains the following sections:
  28.  
  29. OVERVIEW            General description of JPEG and the IJG software.
  30. LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
  31. REFERENCES          Where to learn more about JPEG.
  32. ARCHIVE LOCATIONS   Where to find newer versions of this software.
  33. RELATED SOFTWARE    Other stuff you should get.
  34. FILE FORMAT WARS    Software *not* to get.
  35. TO DO               Plans for future IJG releases.
  36.  
  37. Other documentation files in the distribution are:
  38.  
  39. User documentation:
  40.   install.doc       How to configure and install the IJG software.
  41.   usage.doc         Usage instructions for cjpeg, djpeg, jpegtran,
  42.                     rdjpgcom, and wrjpgcom.
  43.   *.1               Unix-style man pages for programs (same info as usage.doc).
  44.   wizard.doc        Advanced usage instructions for JPEG wizards only.
  45.   change.log        Version-to-version change highlights.
  46. Programmer and internal documentation:
  47.   libjpeg.doc       How to use the JPEG library in your own programs.
  48.   example.c         Sample code for calling the JPEG library.
  49.   structure.doc     Overview of the JPEG library's internal structure.
  50.   filelist.doc      Road map of IJG files.
  51.   coderules.doc     Coding style rules --- please read if you contribute code.
  52.  
  53. Please read at least the files install.doc and usage.doc.  Useful information
  54. can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
  55. ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
  56.  
  57. If you want to understand how the JPEG code works, we suggest reading one or
  58. more of the REFERENCES, then looking at the documentation files (in roughly
  59. the order listed) before diving into the code.
  60.  
  61.  
  62. OVERVIEW
  63. ========
  64.  
  65. This package contains C software to implement JPEG image compression and
  66. decompression.  JPEG (pronounced "jay-peg") is a standardized compression
  67. method for full-color and gray-scale images.  JPEG is intended for
  68. compressing "real-world" scenes; line drawings, cartoons and other
  69. non-realistic images are not its strong suit.  JPEG is lossy, meaning that
  70. the output image is not exactly identical to the input image.  Hence you must
  71. not use JPEG if you have to have identical output bits.  However, on typical
  72. photographic images, very good compression levels can be obtained with no
  73. visible change, and remarkably high compression levels are possible if you
  74. can tolerate a low-quality image.  For more details, see the references, or
  75. just experiment with various compression settings.
  76.  
  77. This software implements JPEG baseline, extended-sequential, and progressive
  78. compression processes.  Provision is made for supporting all variants of
  79. these processes, although some uncommon parameter settings aren't implemented
  80. yet. For legal reasons, we are not distributing code for the
  81. arithmetic-coding variants of JPEG; see LEGAL ISSUES.  We have made no
  82. provision for supporting the hierarchical or lossless processes defined in
  83. the standard.
  84.  
  85. We provide a set of library routines for reading and writing JPEG image
  86. files, plus two sample applications "cjpeg" and "djpeg", which use the
  87. library to perform conversion between JPEG and some other popular image file
  88. formats. The library is intended to be reused in other applications.
  89.  
  90. In order to support file conversion and viewing software, we have included
  91. considerable functionality beyond the bare JPEG coding/decoding capability;
  92. for example, the color quantization modules are not strictly part of JPEG
  93. decoding, but they are essential for output to colormapped file formats or
  94. colormapped displays.  These extra functions can be compiled out of the
  95. library if not required for a particular application.  We have also included
  96. "jpegtran", a utility for lossless transcoding between different JPEG
  97. processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
  98. inserting and extracting textual comments in JFIF files.
  99.  
  100. The emphasis in designing this software has been on achieving portability and
  101. flexibility, while also making it fast enough to be useful.  In particular,
  102. the software is not intended to be read as a tutorial on JPEG.  (See the
  103. REFERENCES section for introductory material.)  Rather, it is intended to be
  104. reliable, portable, industrial-strength code.  We do not claim to have
  105. achieved that goal in every aspect of the software, but we strive for it.
  106.  
  107. We welcome the use of this software as a component of commercial products. No
  108. royalty is required, but we do ask for an acknowledgement in product
  109. documentation, as described under LEGAL ISSUES.
  110.  
  111.  
  112. LEGAL ISSUES
  113. ============
  114.  
  115. In plain English:
  116.  
  117. 1. We don't promise that this software works.  (But if you find any bugs,
  118.    please let us know!)
  119. 2. You can use this software for whatever you want.  You don't have to pay
  120. us.
  121. 3. You may not pretend that you wrote this software.  If you use it in a
  122.    program, you must acknowledge somewhere in your documentation that
  123.    you've used the IJG code.
  124.  
  125. In legalese:
  126.  
  127. The authors make NO WARRANTY or representation, either express or implied,
  128. with respect to this software, its quality, accuracy, merchantability, or
  129. fitness for a particular purpose.  This software is provided "AS IS", and
  130. you, its user, assume the entire risk as to its quality and accuracy.
  131.  
  132. This software is copyright (C) 1991-1998, Thomas G. Lane. All Rights Reserved
  133. except as specified below.
  134.  
  135. Permission is hereby granted to use, copy, modify, and distribute this
  136. software (or portions thereof) for any purpose, without fee, subject to these
  137. conditions:
  138. (1) If any part of the source code for this software is distributed, then
  139. this README file must be included, with this copyright and no-warranty notice
  140. unaltered; and any additions, deletions, or changes to the original files
  141. must be clearly indicated in accompanying documentation.
  142. (2) If only executable code is distributed, then the accompanying
  143. documentation must state that "this software is based in part on the work of
  144. the Independent JPEG Group".
  145. (3) Permission for use of this software is granted only if the user accepts
  146. full responsibility for any undesirable consequences; the authors accept
  147. NO LIABILITY for damages of any kind.
  148.  
  149. These conditions apply to any software derived from or based on the IJG code,
  150. not just to the unmodified library.  If you use our work, you ought to
  151. acknowledge us.
  152.  
  153. Permission is NOT granted for the use of any IJG author's name or company
  154. name in advertising or publicity relating to this software or products
  155. derived from it.  This software may be referred to only as "the Independent
  156. JPEG Group's software".
  157.  
  158. We specifically permit and encourage the use of this software as the basis of
  159. commercial products, provided that all warranty or liability claims are
  160. assumed by the product vendor.
  161.  
  162.  
  163. ansi2knr.c is included in this distribution by permission of L. Peter
  164. Deutsch, sole proprietor of its copyright holder, Aladdin Enterprises of
  165. Menlo Park, CA. ansi2knr.c is NOT covered by the above copyright and
  166. conditions, but instead by the usual distribution terms of the Free Software
  167. Foundation; principally, that you must include source code if you
  168. redistribute it.  (See the file ansi2knr.c for full details.)  However, since
  169. ansi2knr.c is not needed as part of any program generated from the IJG code,
  170. this does not limit you more than the foregoing paragraphs do.
  171.  
  172. The Unix configuration script "configure" was produced with GNU Autoconf. It
  173. is copyright by the Free Software Foundation but is freely distributable. The
  174. same holds for its supporting scripts (config.guess, config.sub, ltconfig,
  175. ltmain.sh).  Another support script, install-sh, is copyright by M.I.T. but
  176. is also freely distributable.
  177.  
  178. It appears that the arithmetic coding option of the JPEG spec is covered by
  179. patents owned by IBM, AT&T, and Mitsubishi.  Hence arithmetic coding cannot
  180. legally be used without obtaining one or more licenses.  For this reason,
  181. support for arithmetic coding has been removed from the free JPEG software.
  182. (Since arithmetic coding provides only a marginal gain over the unpatented
  183. Huffman mode, it is unlikely that very many implementations will support it.)
  184. So far as we are aware, there are no patent restrictions on the remaining
  185. code.
  186.  
  187. The IJG distribution formerly included code to read and write GIF files. To
  188. avoid entanglement with the Unisys LZW patent, GIF reading support has been
  189. removed altogether, and the GIF writer has been simplified to produce
  190. "uncompressed GIFs".  This technique does not use the LZW algorithm; the
  191. resulting GIF files are larger than usual, but are readable by all standard
  192. GIF decoders.
  193.  
  194. We are required to state that
  195.     "The Graphics Interchange Format(c) is the Copyright property of
  196.     CompuServe Incorporated.  GIF(sm) is a Service Mark property of
  197.     CompuServe Incorporated."
  198.  
  199.  
  200. REFERENCES
  201. ==========
  202.  
  203. We highly recommend reading one or more of these references before trying to
  204. understand the innards of the JPEG software.
  205.  
  206. The best short technical introduction to the JPEG compression algorithm is
  207.     Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
  208.     Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
  209. (Adjacent articles in that issue discuss MPEG motion picture compression,
  210. applications of JPEG, and related topics.)  If you don't have the CACM issue
  211. handy, a PostScript file containing a revised version of Wallace's article is
  212. available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz.  The file (actually a preprint for an article that appeared in IEEE Trans. Consumer
  213. Electronics) omits the sample images that appeared in CACM, but it includes
  214. corrections and some added material.  Note: the Wallace article is copyright
  215. ACM and IEEE, and it may not be used for commercial purposes.
  216.  
  217. A somewhat less technical, more leisurely introduction to JPEG can be found
  218. in "The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published
  219. by M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1.  This book
  220. provides good explanations and example C code for a multitude of compression
  221. methods including JPEG.  It is an excellent source if you are comfortable
  222. reading C code but don't know much about data compression in general.  The
  223. book's JPEG sample code is far from industrial-strength, but when you are
  224. ready to look at a full implementation, you've got one here...
  225.  
  226. The best full description of JPEG is the textbook "JPEG Still Image Data
  227. Compression Standard" by William B. Pennebaker and Joan L. Mitchell,
  228. published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.  Price
  229. US$59.95, 638 pp. The book includes the complete text of the ISO JPEG
  230. standards (DIS 10918-1 and draft DIS 10918-2).  This is by far the most
  231. complete exposition of JPEG in existence, and we highly recommend it.
  232.  
  233. The JPEG standard itself is not available electronically; you must order a
  234. paper copy through ISO or ITU.  (Unless you feel a need to own a certified
  235. official copy, we recommend buying the Pennebaker and Mitchell book instead;
  236. it's much cheaper and includes a great deal of useful explanatory material.)
  237. In the USA, copies of the standard may be ordered from ANSI Sales at (212)
  238. 642-4900, or from Global Engineering Documents at (800) 854-7179.  (ANSI
  239. doesn't take credit card orders, but Global does.)  It's not cheap: as of
  240. 1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
  241. shipping/handling.  The standard is divided into two parts, Part 1 being the
  242. actual specification, while Part 2 covers compliance testing methods.  Part 1
  243. is titled "Digital Compression and Coding of Continuous-tone Still Images,
  244. Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
  245. 10918-1, ITU-T T.81.  Part 2 is titled "Digital Compression and Coding of
  246. Continuous-tone Still Images, Part 2: Compliance testing" and has document
  247. numbers ISO/IEC IS 10918-2, ITU-T T.83.
  248.  
  249. Some extensions to the original JPEG standard are defined in JPEG Part 3, a
  250. newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84.  IJG currently
  251. does not support any Part 3 extensions.
  252.  
  253. The JPEG standard does not specify all details of an interchangeable file
  254. format.  For the omitted details we follow the "JFIF" conventions, revision
  255. 1.02.  A copy of the JFIF spec is available from:
  256.     Literature Department
  257.     C-Cube Microsystems, Inc.
  258.     1778 McCarthy Blvd.
  259.     Milpitas, CA 95035
  260.     phone (408) 944-6300,  fax (408) 944-6314
  261. A PostScript version of this document is available by FTP at
  262. ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz.  There is also a plain text
  263. version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
  264. the figures.
  265.  
  266. The TIFF 6.0 file format specification can be obtained by FTP from
  267. ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz.  The JPEG incorporation scheme
  268. found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems. IJG
  269. does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
  270. Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
  271. (Compression tag 7).  Copies of this Note can be obtained from ftp.sgi.com or
  272. from ftp://ftp.uu.net/graphics/jpeg/.  It is expected that the next revision
  273. of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
  274. Although IJG's own code does not support TIFF/JPEG, the free libtiff library
  275. uses our library to implement TIFF/JPEG per the Note.  libtiff is available
  276. from ftp://ftp.sgi.com/graphics/tiff/.
  277.  
  278.  
  279. ARCHIVE LOCATIONS
  280. =================
  281.  
  282. The "official" archive site for this software is ftp.uu.net (Internet address
  283. 192.48.96.9).  The most recent released version can always be found there in
  284. directory graphics/jpeg.  This particular version will be archived as
  285. ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz.  If you don't have direct
  286. Internet access, UUNET's archives are also available via UUCP; contact
  287. help@uunet.uu.net for information on retrieving files that way.
  288.  
  289. Numerous Internet sites maintain copies of the UUNET files.  However, only
  290. ftp.uu.net is guaranteed to have the latest official version.
  291.  
  292. You can also obtain this software in DOS-compatible "zip" archive format from
  293. the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
  294. on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
  295. "JPEG Tools".  Again, these versions may sometimes lag behind the ftp.uu.net
  296. release.
  297.  
  298. The JPEG FAQ (Frequently Asked Questions) article is a useful source of
  299. general information about JPEG.  It is updated constantly and therefore is
  300. not included in this distribution.  The FAQ is posted every two weeks to
  301. Usenet newsgroups comp.graphics.misc, news.answers, and other groups. It is
  302. available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/ and
  303. other news.answers archive sites, including the official news.answers archive
  304. at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/. If you
  305. don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu with
  306. body
  307.     send usenet/news.answers/jpeg-faq/part1
  308.     send usenet/news.answers/jpeg-faq/part2
  309.  
  310.  
  311. RELATED SOFTWARE
  312. ================
  313.  
  314. Numerous viewing and image manipulation programs now support JPEG.  (Quite a
  315. few of them use this library to do so.)  The JPEG FAQ described above lists
  316. some of the more popular free and shareware viewers, and tells where to
  317. obtain them on Internet.
  318.  
  319. If you are on a Unix machine, we highly recommend Jef Poskanzer's free
  320. PBMPLUS software, which provides many useful operations on PPM-format image
  321. files.  In particular, it can convert PPM images to and from a wide range of
  322. other formats, thus making cjpeg/djpeg considerably more useful.  The latest
  323. version is distributed by the NetPBM group, and is available from numerous
  324. sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
  325. Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software
  326. is; you are likely to have difficulty making it work on any non-Unix machine.
  327.  
  328. A different free JPEG implementation, written by the PVRG group at Stanford,
  329. is available from ftp://havefun.stanford.edu/pub/jpeg/.  This program is
  330. designed for research and experimentation rather than production use; it is
  331. slower, harder to use, and less portable than the IJG code, but it is easier
  332. to read and modify.  Also, the PVRG code supports lossless JPEG, which we do
  333. not.  (On the other hand, it doesn't do progressive JPEG.)
  334.  
  335.  
  336. FILE FORMAT WARS
  337. ================
  338.  
  339. Some JPEG programs produce files that are not compatible with our library.
  340. The root of the problem is that the ISO JPEG committee failed to specify a
  341. concrete file format.  Some vendors "filled in the blanks" on their own,
  342. creating proprietary formats that no one else could read.  (For example, none
  343. of the early commercial JPEG implementations for the Macintosh were able to
  344. exchange compressed files.)
  345.  
  346. The file format we have adopted is called JFIF (see REFERENCES).  This format
  347. has been agreed to by a number of major commercial JPEG vendors, and it has
  348. become the de facto standard.  JFIF is a minimal or "low end" representation.
  349. We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
  350. Technical Note #2) for "high end" applications that need to record a lot of
  351. additional data about an image.  TIFF/JPEG is fairly new and not yet widely
  352. supported, unfortunately.
  353.  
  354. The upcoming JPEG Part 3 standard defines a file format called SPIFF. SPIFF
  355. is interoperable with JFIF, in the sense that most JFIF decoders should be
  356. able to read the most common variant of SPIFF.  SPIFF has some technical
  357. advantages over JFIF, but its major claim to fame is simply that it is an
  358. official standard rather than an informal one.  At this point it is unclear
  359. whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
  360. standard.  IJG intends to support SPIFF once the standard is frozen, but we
  361. have not decided whether it should become our default output format or not.
  362. (In any case, our decoder will remain capable of reading JFIF indefinitely.)
  363.  
  364. Various proprietary file formats incorporating JPEG compression also exist.
  365. We have little or no sympathy for the existence of these formats.  Indeed,
  366. one of the original reasons for developing this free software was to help
  367. force convergence on common, open format standards for JPEG files.  Don't use
  368. a proprietary file format!
  369.  
  370.  
  371. TO DO
  372. =====
  373.  
  374. The major thrust for v7 will probably be improvement of visual quality. The
  375. current method for scaling the quantization tables is known not to be very
  376. good at low Q values.  We also intend to investigate block boundary
  377. smoothing, "poor man's variable quantization", and other means of improving
  378. quality-vs-file-size performance without sacrificing compatibility.
  379.  
  380. In future versions, we are considering supporting some of the upcoming JPEG
  381. Part 3 extensions --- principally, variable quantization and the SPIFF file
  382. format.
  383.  
  384. As always, speeding things up is of great interest.
  385.  
  386. Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net.
  387.